﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace Stationierung
{
    class AddStationCommandHandle : ICommand
    {
        public bool CanExecute(object parameter)
        {
            return App.MainViewModel.CanAddNewStation();
        }

        public event EventHandler CanExecuteChanged
        {
            add { CommandManager.RequerySuggested += value; }
            remove { CommandManager.RequerySuggested -= value; }
        }

        public void Execute(object parameter)
        {
            App.MainViewModel.AddNewStation();
        }
    }
}
